// image.go
package componnet

import (
	"path/filepath"
)

//获取图片的绝对物理地址
func ImageAbsolutePath(imgDbPath string) string {
	aPath, aerr := filepath.Abs(imgDbPath)
	if aerr != nil {
		return ""
	} else {
		return aPath
	}
}

//获取图片的URL地址
func ImageUrlPath(domain string, imgDbPath string) string {
	return domain + imgDbPath

}
